import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int a = in.nextInt();
            int h = in.nextInt();
            int b = in.nextInt();
            int k = in.nextInt();
            long ret = 0;
            while (h > 0 && k > 0) {
                ret += a;
                ret += b;
                h -= b;
                k -= a;
            }
            if (h > 0) {
                ret += a*10L;
            }
            if (k > 0) {
                ret += b*10L;
            }
            System.out.println(ret);
        }
    }
}
